//
//  Select_DirectlyleaderTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/8.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Select_DirectlyleaderTableViewCell.h"

@implementation Select_DirectlyleaderTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.btn_Select = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [self.btn_Select setBackgroundImage:[UIImage imageNamed:@"Selected.png"] forState:(UIControlStateNormal)];
    [self.contentView addSubview:self.btn_Select];
    
    self.image_Head = [[UIImageView alloc] init];
    self.image_Head.layer.cornerRadius = 23;
    self.image_Head.layer.masksToBounds = YES;
    [self.contentView addSubview:self.image_Head];
    
    self.user_Name = [[UILabel alloc] init];
//    self.user_Name.text = @"山东快书";
    self.user_Name.textColor = [UIColor blackColor];
    self.user_Name.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.user_Name];
    
    self.user_Department = [[UILabel alloc] init];
//    self.user_Department.text = @"就开始就开始就几节课";
    self.user_Department.textColor = [UIColor grayColor];
    self.user_Department.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:self.user_Department];
    
    self.view_TopLine = [[UIView alloc] init];
    self.view_TopLine.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_TopLine];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.btn_Select.frame = CGRectMake(11, 17.5, 25, 25);
    
    self.image_Head.frame = CGRectMake(CGRectGetMaxX(self.btn_Select.frame) + 20, 7, 46, 46);
    
    self.user_Name.frame = CGRectMake(CGRectGetMaxX(self.image_Head.frame) + 10, 11, SCREEN_WIDTH - CGRectGetMaxX(self.image_Head.frame) - 20, 15);
    
    self.user_Department.frame = CGRectMake(CGRectGetMaxX(self.image_Head.frame) + 10, 35, SCREEN_WIDTH - CGRectGetMaxX(self.image_Head.frame) - 20, 15);
    
    self.view_TopLine.frame = CGRectMake(CGRectGetMinX(self.user_Name.frame), 59, SCREEN_WIDTH - CGRectGetMinX(self.user_Name.frame), 1);
}




















@end
